shout3d.sound
Class JavaSound

java.lang.Object
  |
  +--shout3d.core.Node
        |
        +--shout3d.sound.JavaSound

public class JavaSound
extends Node
implements FieldObserver

A class which implements sound via the standard Java 1.0 API.

 JavaSound nodes may play either .au or .wav files.
 
 The .au sound files that may be played by the JavaSound node are limited to
 those with the following characteristics:
 -- encoding type of 8 bit ulaw
 -- sample rate of 8000 samples per second
 -- monaural
 
No other sound files will successfully play. Attempting to play sound files with different characteristics may result in the throwing of an InvalidAudioFormat exception.


Field Summary
 BooleanField loop
           
 DoubleField startTime
           
 DoubleField stopTime
           
 StringField url
           
 
Constructor Summary
JavaSound()
          Constructs a default sound
JavaSound(Shout3DViewer viewer)
          Constructs a Sound with a Viewer
 
Method Summary
 void cleanUp()
          Called when the applet is stopped.
 void onFieldChange(Field theField, java.lang.Object userData)
           
 void setViewer(Shout3DViewer viewer)
           
 
Methods inherited from class shout3d.core.Node
getDEFName, getField, getFieldByIndex, getFieldName, getNumFields, getTypeName, getViewer, isOfType, setDEFName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

startTime

public final DoubleField startTime

stopTime

public final DoubleField stopTime

loop

public final BooleanField loop

url

public final StringField url
Constructor Detail

JavaSound

public JavaSound()
Constructs a default sound

JavaSound

public JavaSound(Shout3DViewer viewer)
Constructs a Sound with a Viewer
Method Detail

setViewer

public void setViewer(Shout3DViewer viewer)
Overrides:
setViewer in class Node

cleanUp

public void cleanUp()
Called when the applet is stopped. Stops the audio from playing.
Overrides:
cleanUp in class Node

onFieldChange

public void onFieldChange(Field theField,
                          java.lang.Object userData)
Specified by:
onFieldChange in interface FieldObserver